home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wics.zip / IBUTTON.H < prev    next >
C/C++ Source or Header  |  1993-03-03  |  2KB  |  58 lines

  1. //==============================================================================================
  2. //
  3. //    Microdyne Libraries for the Object Windows Libraries
  4. //    Version 1.00
  5. //
  6. //    IBUTTON.H - Icon Bar Button Class
  7. //    Copyright ⌐ 1993 by Microdyne Development Technologies.
  8. //    All rights reserved.
  9. //==============================================================================================
  10.  
  11. #ifndef __IBUTTON_H
  12. #define __IBUTTON_H
  13.  
  14. #ifndef __BUTTON_H
  15. #include <button.h>
  16. #endif
  17.  
  18. #include "wics.h"
  19.  
  20. #pragma option -Vo-
  21.  
  22. _CLASSDEF(TIconBarButton)
  23.  
  24. class _EXPORT TIconBarButton : public TButton
  25. {
  26. public:
  27.     TIconBarButton(PTWindowsObject AParent, int AnId, int X, int Y, BOOL fState = FALSE, PTModule AModule = NULL);
  28.     TIconBarButton(PTWindowsObject AParent, int ResourceId, PTModule AModule = NULL);
  29.     static PTStreamable build();
  30.  
  31.     virtual int  GetControlLength () { return Attr.W; }
  32.     virtual void SetCommandCode (WORD cmd) { SendMessage(HWindow, WM_USER+102, (WPARAM) cmd, 0L); }
  33.     virtual void SetPicture (HBITMAP hBitmap, WORD state, BOOL fRedraw)
  34.         { SendMessage (HWindow, WM_USER+100, (WPARAM) hBitmap, MAKELPARAM(state, fRedraw)); }
  35.     virtual void StopRepeat () { SendMessage(HWindow, WM_USER+101, 0, 0L); } ;
  36.  
  37. protected:
  38.     virtual LPSTR GetClassName() { return "WICSButton"; }
  39.     TIconBarButton(StreamableInit) : TButton(streamableInit) {};
  40.  
  41. private:
  42.     virtual const Pchar streamableName() const { return "TIconBarButton"; }
  43. };
  44.  
  45. inline Ripstream operator >> ( Ripstream is, RTIconBarButton cl )
  46.     { return is >> (RTStreamable)cl; }
  47. inline Ripstream operator >> ( Ripstream is, RPTIconBarButton cl )
  48.     { return is >> (RPvoid)cl; }
  49.  
  50. inline Ropstream operator << ( Ropstream os, RTIconBarButton cl )
  51.     { return os << (RTStreamable)cl; }
  52. inline Ropstream operator << ( Ropstream os, PTIconBarButton cl )
  53.     { return os << (PTStreamable)cl; }
  54.  
  55. #pragma option -Vo.
  56.  
  57. #endif
  58.